package come.my.test;

public class day20 {
    public static void main(String[] args) {
        Number number = new Number();
        int a=number.add(7);
        int b=number.reduce(4);
        System.out.println("景区里还剩"+(a-b));
    }
}
interface Addable{
     int add(int cars);
}
interface Reducible{
     int reduce(int cars);
}
interface Changeable extends Addable,Reducible{
     final int UNITS=30;
}
class Number implements Changeable{

    @Override
    public int  add(int cars) {
        return UNITS*cars;
    }

    @Override
    public int  reduce(int cars) {
          return UNITS*cars;
    }
}